import request from '@/utils/request'
import { makeFormData } from '@/utils/util'

export const api = {
  add: 'api/developReview/add_user_month',
  developReview: 'api/developReview/month_list',
  developReviewItem: 'api/developReview/month_item_list',
  childrenDetails: 'api/developReview/childrenDetails',
  exportChildrenDetails: 'api/developReview/exportChildrenDetails'
}

export function getMonthDevelopReview (params = {}) {
  return request({
    url: api.developReview,
    method: 'post',
    params
  })
}

export function getMonthDevelopReviewItem (params = {}) {
  return request({
    url: api.developReviewItem,
    method: 'post',
    params
  })
}

export function addDevelopReview (data = {}) {
  return request({
    url: api.add,
    method: 'post',
    data: makeFormData(data)
  })
}

export function getChildrenDetails (params = {}) {
  return request({
    url: api.childrenDetails,
    method: 'post',
    params
  })
}

export function exportChildrenDetails (params = {}) {
  return request({
    url: api.exportChildrenDetails,
    method: 'post',
    params
  })
}
